package org.springcloud.wisdom.springcloud_03_freshman.student.controller;

import org.springcloud.wisdom.springcloud_03_freshman.common.bean.ResponseData;
import org.springcloud.wisdom.springcloud_03_freshman.common.controller.BaseController;
import org.springcloud.wisdom.springcloud_03_freshman.student.service.DormitoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/dormitory")
public class DormitoryController  extends BaseController {
    @Autowired
    DormitoryService dormitoryService;
    @GetMapping("/get")
    public ResponseData<Object> get(@RequestParam("id") Integer id){
        return returnObject(dormitoryService.getDormitoryById(id));
    }
}
